package com.cn.jx.manager.po;

import static com.jx.util.CodeUtil.getRandomId;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.cn.jx.common.entity.BaseEntity;
import com.jx.enumType.YesNoEnum;

@Entity
@Table(name="SYS_NOTICE")
public class Notice extends BaseEntity {

	/** <p>TODO <p>{@link long serialVersionUID}*/
	private static final long serialVersionUID = -3979197619040933492L;

	@Column(name="title",length=100)
	private String title;
	
	@Column(name="sub_title",length=100)
	private String subTitle;
	
	@Column(name="content",length=800)
	private String content;
	
	public static Notice getInstance(String operUser){
		Date day=new Date();
		Notice m=new Notice();
		m.setId(getRandomId());
		m.setDelFlg(YesNoEnum.NO.getCode());
		m.setValidFlg(YesNoEnum.YES.getCode());
		m.setOperatTime(day);
		m.setCreateTime(day);
		m.setOperatUser(operUser);
		m.setCreateUser(operUser);
		return m;
	}
	
	/** <p>{@link String String getSubTitle()*/
	public String getSubTitle() {
		return subTitle;
	}

	/** <p>setSubTitle({@link String String subTitle})*/
	public void setSubTitle(String subTitle) {
		this.subTitle = subTitle;
	}

	/** <p>{@link String String getTitle()*/
	public String getTitle() {
		return title;
	}

	/** <p>setTitle({@link String String title})*/
	public void setTitle(String title) {
		this.title = title;
	}

	/** <p>{@link String String getContent()*/
	public String getContent() {
		return content;
	}

	/** <p>setContent({@link String String content})*/
	public void setContent(String content) {
		this.content = content;
	}


}
